home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 049a / btd_301.zip / BTD3.BAT < prev    next >
DOS Batch File  |  1991-11-16  |  3KB  |  159 lines

  1. echo off
  2. cls
  3. :    *****************************************************
  4. :       This batch file uses BTD's errorlevel exit mode
  5. :    *****************************************************
  6.  
  7. : Start up your FOSSIL
  8.  
  9. btf1m -m-
  10.  
  11.  
  12. : Start up BTD with a configuration file
  13.  
  14. :loop
  15. btd btd.cf3
  16. echo .
  17.  
  18.  
  19. : Check all BTD's returned errorlevels
  20.  
  21. : These are our errors 
  22. if errorlevel = 246 goto exit
  23. if errorlevel = 240 goto midnight
  24.  
  25. : Trap user exit levels - NONE defined
  26. if errorlevel = 30 goto userexit
  27.  
  28. : These are ours - exit mode specific
  29. if errorlevel = 29 goto bunknown
  30. if errorlevel = 28 goto b38400
  31. if errorlevel = 27 goto b19200
  32. if errorlevel = 26 goto b9600
  33. if errorlevel = 25 goto b4800
  34. if errorlevel = 24 goto b2400
  35. if errorlevel = 23 goto b1200
  36. if errorlevel = 22 goto b600
  37. if errorlevel = 21 goto b300
  38. if errorlevel = 20 goto b7200
  39. if errorlevel = 19 goto b1275
  40. if errorlevel = 18 goto bbslocal
  41.  
  42.  
  43. echo ALL OKAY...
  44. goto loop
  45.  
  46. :midnight
  47. echo BTD: Midnight rollover
  48. goto loop
  49.  
  50. :userexit
  51. echo BTD: User event exit (30-239)
  52. goto loop
  53.  
  54. :bbslocal
  55. echo BTD: local logon
  56. max -k -lmax01.log
  57. goto exit
  58.  
  59. :bunknown
  60. echo BTD: Unknown remote logon speed
  61. goto loop
  62.  
  63. :b38400
  64. echo BTD: Remote logon at 38400
  65. max -b38400 -n1 -lmax01.log
  66. goto loop1
  67.  
  68. :b19200
  69. echo BTD: Remote logon at 19200
  70. max -b19200 -n1 -lmax01.log
  71. goto loop1
  72.  
  73. :b9600
  74. echo BTD: Remote logon at 9600
  75. max -b9600 -n1 -lmax01.log
  76. goto loop1
  77.  
  78. :b7200
  79. echo BTD: Remote logon at 7200
  80. max -b7200 -n1 -lmax01.log
  81. goto loop1
  82.  
  83. :b4800
  84. echo BTD: Remote logon at 4800
  85. max -b4800 -n1 -lmax01.log
  86. goto loop1
  87.  
  88. :b2400
  89. echo BTD: Remote logon at 2400
  90. max -b2400 -n1 -lmax01.log
  91. goto loop1
  92.  
  93. :b1275
  94. echo BTD: Remote logon at 1275
  95. max -b600 -n1 -lmax01.log
  96. goto loop1
  97.  
  98. :b1200
  99. echo BTD: Remote logon at 1200
  100. max -b1200 -n1 -lmax01.log
  101. goto loop1
  102.  
  103. :b600
  104. echo BTD: Remote logon at 600
  105. max -b600 -n1 -lmax01.log
  106. goto loop1
  107.  
  108. :b300
  109. echo BTD: Remote logon at 300
  110. max -b300 -n1 -lmax01.log
  111.  
  112. :loop1
  113. : This from Maximus
  114. if errorlevel = 255 goto exit
  115. : These from Maximus
  116. if errorlevel = 16 goto stackerr
  117. if errorlevel = 12 goto echonet
  118. if errorlevel = 11 goto netmail
  119. if errorlevel =  5 goto notechonet
  120. if errorlevel =  4 goto maxerr3
  121. if errorlevel =  3 goto maxerr2
  122. if errorlevel =  2 goto callergone
  123. if errorlevel =  1 goto maxerr1
  124. goto loop
  125.  
  126. :stackerr
  127. echo Max: internal stack error
  128. goto exit
  129.  
  130. :echonet
  131. echo Max: Echo/Net Mail entered
  132. goto loop
  133.  
  134. :netmail
  135. echo Max: Net Mail entered
  136. goto loop
  137.  
  138. :notechonet
  139. echo Max: No Echo/Net Mail entered
  140. goto loop
  141.  
  142. :maxerr3
  143. echo Max: Error Condition 3
  144. goto exit
  145.  
  146. :maxerr2
  147. echo Max: Error Condition 2
  148. goto exit
  149.  
  150. :callergone
  151. echo Max: Caller vanished during log-on
  152. goto loop
  153.  
  154. :maxerr1
  155. echo Max: Error condition 1
  156.  
  157.  
  158. :exit
  159.